Skip to content

Conversation

@DudeTux42
Copy link

Improved lesson 17 for clarity

The original task asked for "a word character followed by a digit", which correctly translates to \w\d. However, since \w includes digits, it also matches strings like "12", which caused confusion because "12" shouldn't match if the intent is to start with a letter.

To avoid this ambiguity and make the lesson more beginner-friendly, I changed the task to "whitespace followed by a digit", using \s\d, which demonstrates two shorthand character classes more clearly and avoids conflicting edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant